using System.Drawing;
using System.Drawing.Imaging;
using System.IO;

#if ASP
using System.Web;
#endif

namespace Graphix
{
    public interface IChart
    {
        IChart SetBackground(Color backgroundColor);

        //offset od -1 do 1
        IChart SetTitle(string title, Font font, Horizontal position = Horizontal.Center, Horizontal alignment = Horizontal.Center, float offset = 0, Brush color = null); //1
        //IChart SetSubTitle(string title, Horizontal alignment); //13

        IChart AddInformation(string info, Font font, Brush color = null); //3 //4
        IChart SetXTitle(string title, Font font, Brush color = null); //9
        IChart SetYTitle(string title, Font font, Brush color = null, bool ignoreMove = true); //5
        IChart AddTitleMarginMarker(string title, double position, Pen line, Font font, Brush textColor = null, bool moreMarkers = true); //15
        IChart AddTitleMarginMarkers(StringPoint[] array);

        IChart SetXLabels(string[] labels, Pen linePen, Font font, Brush color = null, double min = 0, double max = 1, double tick = 0.1, Orientation orientation = Orientation.Horizontal);//7
        IChart SetXLabels(double min, double max, Orientation orientation = Orientation.Horizontal);//7
        IChart SetX2Labels(string[] labels, Font font, Brush textColor = null, double min = 0.0, double max = 1.0, Orientation orientation = Orientation.Horizontal);
        IChart SetX2Labels(double min, double max, Orientation orientation = Orientation.Horizontal);

        IChart SetYLabels(string[] labels, Pen linePen, Font font, Brush textColor = null, Orientation orientation = Orientation.Horizontal);//8
        IChart SetYLabels(double min, double max, Orientation orientation = Orientation.Horizontal);//8
        IChart SetY2Labels(string[] labels, Font font, Brush textColor = null, double min = 0, double max = 1, Orientation orientation = Orientation.Horizontal);
        IChart SetY2Labels(double min, double max, Orientation orientation = Orientation.Horizontal);

        IChart DrawCurve(PointF[] points, string objectName, ValueType valueTypes = ValueType.None, Color color = default(Color), float penSize = 1);//17//18 todo: type, wzgledem czego?
#if ASP
        IHtmlString SaveAsp();
#endif
        string Save();

        void SaveToStream(Stream ms, ImageFormat format);
        void SaveToFile(string filename, ImageFormat format);
    }
}